package cn.stuManagement.student;

import java.io.Serializable;
import java.util.Date;

public class Message implements Serializable,Comparable<Message> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	//留言的编号，唯一编码
	private String messageID;
	//发送留言人
	private String fromID;
	//接收留言人
	private String toID;	
	//留言时间
	private Date date;
	//留言状态(send发送、rec接收)
	private String state;
	//留言内容
	private String content;
	
	

	@Override
	public int compareTo(Message o) {
	
		return this.getDate().compareTo(o.getDate());
	}
	
	@Override
	public String toString() {
		return "Message [from:" + fromID + ", to:" + toID + ", date=" + date + ", state=" + state
				+ ", content=" + content + "]";
	}

	//	get&set方法
	
	public Date getDate() {
		return date;
	}
	public String getMessageID() {
		return messageID;
	}

	public void setMessageID(String messageID) {
		this.messageID = messageID;
	}

	public String getFromID() {
		return fromID;
	}

	public void setFromID(String fromID) {
		this.fromID = fromID;
	}

	public String getToID() {
		return toID;
	}

	public void setToID(String toID) {
		this.toID = toID;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}


	
	
}
